package com.cuihanyu.newuniversityover.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


import com.cuihanyu.newuniversityover.base.BaseFragment;

import java.util.ArrayList;
import java.util.List;

/**
 * Created  崔汉宇 on 2017/8/7.
 */

public class NoScrollViewPagerAdapter extends FragmentPagerAdapter {
    List<BaseFragment> list = new ArrayList<>();

    public NoScrollViewPagerAdapter(FragmentManager fm, List<BaseFragment> list) {
        super(fm);
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list != null ? list.size() : 0;
    }
}
